Hello, my name is Simeon.
We have come into an issue with your platform.
We are trying to use PagerDuty Webhooks v3 to communicate with our different integrated platforms. Before we use the Webhooks we want to verify the signature so we know it is coming from a legitimate source (PagerDuty).
So we used this documentation to try to do this - https://developer.pagerduty.com/docs/webhooks/webhook-signatures/
But I think the documentation is outdated.
For example in the documentation it wants us to split the signatures.
X-PagerDuty-Signature:
v1=f03de6f61df6e454f3620c4d6aca17ad072d3f8bbb2760eac3b2ad391b5e8073,
v1=130dcacb53a94d983a37cf2acba98e805a1c37185309ba56fdcccbcf00d6dd8b
Step 1 : Extract the signature(s) from the request
- Extract the signature string from the
X-PagerDuty-Signature
header on the request.- Split the signatures which are separated by the
,
character.- Select only signatures which are version
v1
and remove thev1=
prefix.
But with the payload we receive, we don’t have multiple signatures, just one. I’ll post an example below of the payload request we receive from PagerDuty (the signature and details are fake and just used as an example).
"headers": {
"Accept": "application/json",
"User-Agent": "PagerDuty-Webhook/V3.0",
"X-PagerDuty-Signature": "v1=vu3js9c1dbfwky1gm99bo798e0yjsysggbxomgqkstvxtq0j2u9dn50esg5okqsv",
"Content-Length": "620",
"Content-Type": "application/json"
}
You see it is only one signature not two and it is not separated by a comma.
This is also reflected in the Javascript example code you provided in your documentation (https://developer.pagerduty.com/docs/webhooks/webhook-signatures/) which I believe is also wrong or outdated, as it requires you to split the signature string, which we can’t do.
Is the documentation wrong/outdated, or am I looking in the wrong place, if so how do we go about verifying PagerDuty v3 webhook signatures so we can start to make secure requests?
Thank You
Kind Regards
Simeon